package com.gqzmy.springboot3.exceptions;

/**
 * @author 周小哥  gqzmy@163.com 2023/4/24 9:56
 */

public enum ErrorOverview {

    RESOURCE_NOT_EXIST("A10001", "资源不存在"),

    DATA_ALREADY_EXISTS("DB000001", "已存在相同数据");

    private String errorCode;

    private String errorMessage;

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    ErrorOverview(String errorCode, String errorMessage) {
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }

    @Override
    public String toString() {
        return "ErrorCode{" +
                "errorCode='" + errorCode + '\'' +
                ", errorMessage='" + errorMessage + '\'' +
                '}';
    }
}
